<style>
    .PatInfo{
        padding-bottom:15px;
    }
    .PatInfo>*{
        padding:0px;
    }
    .patinfo-label{
        text-align: right;
    }
    .patinfo-value{
        border-bottom: 1px dashed #ccc;
    }
</style>

<div class="row row-lg PatInfo">
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">主索引：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="patientCode">无</span>
    </div>
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">健康码：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="healthCode">无</span>
    </div>
</div>
<div class="row row-lg PatInfo">
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">姓名：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="name">无</span>
    </div>
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">性别：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="gender">无</span>
    </div>
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">民族：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="nation">无</span>
    </div>
</div>
<div class="row row-lg PatInfo">
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">出生日期：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="birthdate">无</span>
    </div>
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">国籍：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="nationality">无</span>
    </div>
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">籍贯：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="nativePlace">无</span>
    </div>
</div>
<div class="row row-lg PatInfo">
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">年龄：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="age">无</span>
    </div>
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">年龄月：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="ageMonth">无</span>
    </div>
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">年龄天：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="ageDay">无</span>
    </div>
</div>
<div class="row row-lg PatInfo">
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">证件类型：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="cardType">无</span>
    </div>
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">证件号码：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="cardValue">无</span>
    </div>
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">职业：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="career">无</span>
    </div>
</div>
<div class="row row-lg PatInfo">
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">工作单位：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="company">无</span>
    </div>
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">电话：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="telephone">无</span>
    </div>
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">邮箱：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="email">无</span>
    </div>
</div>
<div class="row row-lg PatInfo">
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">血型ABO：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="bloodAbo">无</span>
    </div>
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">户籍地址：</label>
    </div>
    <div class="col-sm-6 patinfo-value">
        <span class="dhcc-con-boder" id="nativeAddress">无</span>
    </div>
</div>
<div class="row row-lg PatInfo">
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">血型Rh：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="bloodRh">无</span>
    </div>
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">现住址：</label>
    </div>
    <div class="col-sm-6 patinfo-value">
        <span class="dhcc-con-boder" id="nowAddress">无</span>
    </div>
</div>
<div class="row row-lg PatInfo">
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">联系人：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="contactor">无</span>
    </div>
    <div class="col-sm-2 patinfo-label">
        <label class="control-label">联系电话：</label>
    </div>
    <div class="col-sm-2 patinfo-value">
        <span class="dhcc-con-boder" id="contactorPhone">无</span>
    </div>
</div>
<script>
    function setPatInfo(patInfo){
        if(!patInfo) return;
        var _patInfo=formatPatInfo(patInfo);
        
        $("#healthCode").text(_patInfo.healthCode);
        $("#patientCode").text(_patInfo.patientCode);
        $("#name").text(_patInfo.name);
        $("#gender").text(_patInfo.gender);
        $("#nationality").text(_patInfo.nationality);
        $("#nation").text(_patInfo.nation);
        $("#birthdate").text(_patInfo.birthdate);
        $("#age").text(_patInfo.age);
        $("#ageMonth").text(_patInfo.ageMonth);
        $("#ageDay").text(_patInfo.ageDay);
        $("#cardType").text(_patInfo.cardType);
        $("#cardValue").text(_patInfo.cardValue);
        
        $("#nativePlace").text(_patInfo.nativePlace);
        $("#nativeAddress").text(_patInfo.nativeAddress);
        $("#nowAddress").text(_patInfo.nowAddress);
        $("#company").text(_patInfo.company);
        $("#telephone").text(_patInfo.telephone);
        $("#email").text(_patInfo.email);
        $("#contactor").text(_patInfo.contactor);
        $("#contactorPhone").text(_patInfo.contactorPhone);
        $("#career").text(_patInfo.career);
        $("#bloodAbo").text(_patInfo.bloodAbo);
        $("#bloodRh").text(_patInfo.bloodRh);
    }
    function clearPatInfo(){
        $(".patinfo-value>span").text("无");
    }
    function formatPatInfo(data){
        if(!data) return;
        if(!(typeof data) == 'object') return;

        var ret=data;
        for(var key in data){
            if(data[key] == "") {
                ret[key]="无";
            }
            if(data[key] == undefined) {
                ret[key]="无";
            }
        }
        return ret;
    }
</script>